from chapter5.regular_expression.testre.re_test_patterns import test_patterns

if __name__ == '__main__':
    text = "A prime #123 example!"
    patterns = [
        (r"\d+", "数字 0-9 的串"),
        (r"\D+", "非数字字符的串"),
        (r"\s+", "空白字符（\t\v\r\n\f ）的串"),
        (r"\S+", "非空白字符（\t\v\r\n\f ）的串"),
        (r"\w+", "构成单词的字符（英文大小写、数字、下划线）组成的的串"),
        (r"\W+", "非构成单词的字符（英文大小写、数字、下划线）组成的的串"),
    ]

    test_patterns(text=text, patterns=patterns)
